package org.yellow.backend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yellow.backend.mapper.departmentMapper;
import org.yellow.backend.pojo.department;

import java.util.List;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Service
@SuppressWarnings({"all"})
public class departmentService {
    @Autowired
    departmentMapper mapper;

    /**
     * 查询所有科室
     * @return
     */
    public List<department> selectAlldepartmemt(){
        return mapper.selectList(null);
    }

    /**
     * 根据id查询对应科室
     * @param id
     * @return
     */
    public department selectDepById(int id){
        return mapper.selectById(id);
    }
}
